<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>惠农网 - 产品分类添加</title>
    <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.min.css" />
    <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/my.css" />
</head>
<body>
<div class="container">
    <%@include file="common/header.jsp"%>
    <div class="row">
        <div class="col-2">
            <%@include file="common/left.jsp"%>
        </div>
        <div class="col-10">
            <div class="jumbotron">
                <h6 class="display-3" style="font-size:2.5rem;">产品分类修改</h6>
                <%--                <p class="lead"></p>--%>
                <hr class="my-4">
                <%--                <p>请选择您要管理的项目</p>--%>
                <form action="${pageContext.request.contextPath}/productCategory/productClass-modify" method="post">
                    <input type="text" style="display: none" name="epcId" value="${ebProductCategory.epcId}" />
                    <div class="form-group form-inline row">
                        <label class="col-sm-2 col-form-label" for="inlineFormCustomSelectPref">父分类：</label>
                        <div class="col-sm-2">
                            <select name="epcParentId" class="custom-select" id="inlineFormCustomSelectPref">
                                <option value="0" selected>根栏目</option>
                                <c:forEach items="${ebProductCategories}" var="productCategories">
                                    <c:if test="${productCategories.epcId==productCategories.epcParentId}">
                                        <c:choose>
                                            <c:when test="${productCategories.epcId==ebProductCategory.epcParentId}">
                                                <option value="${productCategories.epcId}" selected="selected">${productCategories.epcName}</option>
                                            </c:when>
                                            <c:otherwise>
                                                <option value="${productCategories.epcId}">${productCategories.epcName}</option>
                                            </c:otherwise>
                                        </c:choose>
                                    </c:if>
                                </c:forEach>
                            </select>
                        </div>
                    </div>

                    <div class="form-group row">
                        <label for="staticName" class="col-sm-2 col-form-label">分类名称：</label>
                        <div class="col-sm-10">
                            <input type="text"  name="epcName" class="form-control" id="staticName" value="${ebProductCategory.epcName}">
                        </div>
                    </div>



                    <button type="submit" class="btn btn-primary">更改</button>

                </form>
            </div>
        </div>
    </div>
    <div class="row text-center">
        <%@include file="common/footer.jsp"%>
    </div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/popper.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/bootstrap.min.js"></script>
</body>
</html>